<!doctype html>
<html lang="zh">
<head>
    <title>测试vue</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <style type="text/css">
        table.gridtable {
            font-family: verdana, arial, sans-serif;
            font-size: 11px;
            color: #333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
        }

        table.gridtable th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #dedede;
        }

        table.gridtable td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div id="app">
    {{ message }}
</div>
<div id="app-2">
  <span v-bind:title="message">
    鼠标悬停几秒钟查看此处动态绑定的提示信息！
  </span>
</div>
<div id="app-3">
    <p v-if="seen">现在你看到我了</p>
</div>
<div id="app-4">
    <ol>
        <li v-for="todo in todos">
            {{ todo.text }}
        </li>
    </ol>
</div>
<div id="app-5">
    <p>{{ message }}</p>
    <button v-on:click="reverseMessage">反转消息</button>
</div>
<div id="app-6">
    <p>{{ message }}</p>
    <input v-model="message">
</div>
<div id="app-7">
    <ol>
        <!--
          现在我们为每个 todo-item 提供 todo 对象
          todo 对象是变量，即其内容可以是动态的。
          我们也需要为每个组件提供一个“key”，稍后再
          作详细解释。
        -->
        <todo-item
                v-for="item in groceryList"
                v-bind:todo="item"
                v-bind:key="item.id"
        ></todo-item>
    </ol>
</div>
<div id="book-list">
    <label for="queryKey">查询框</label><input v-model="queryKey" id="queryKey" name="queryKey"/>
    <button v-on:click="queryClick" id="queryBook" type="button">查询</button>
    <div>
        <table class="gridtable">
            <tr>
                <th>书籍名</th>
                <th>书籍作者</th>
                <th>最新章节</th>
                <th>最后更新时间</th>
                <th>跳转</th>
            </tr>
            <tr v-for="r in bookData">
                <td>{{r.bookName}}</td>
                <td>{{r.bookAuthor}}</td>
                <td>{{r.lastSection}}</td>
                <td>{{r.lastUpdateTime}}</td>
                <td>
                    <button v-on:click="querySections(r)">打开</button>
                </td>
            </tr>
        </table>
        <table class="gridtable">
            <tr>
                <th>章节数</th>
                <th>章节名</th>

            </tr>
            <tr v-for="r in sectionData">
                <td>{{r.sectionNum}}</td>
                <td>{{r.sectionName}}</td>
                <td>
                    <button v-on:click="querySections(r)">打开</button>
                </td>
            </tr>
        </table>
    </div>
</div>

<script src="../js/jquery-3.5.1.min.js"></script>
<script src="../js/vue.js"></script>

<script src="../js/main.js"></script>

</body>

</html>